/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/* 
 * File:   Object.h
 * Author: dou
 *
 * Created on 2016年2月20日, 下午4:04
 */

#ifndef OBJECT_H
#define OBJECT_H

#ifdef __cplusplus
extern "C" {
#endif
#include "ooc.h"
    
#define OBJECT_PKG  OOC_DPKG
    
    OOC_CLASS_DEF_(OBJECT_PKG, Object){
        
        muc8* (*toString)(OOC_PEN(OBJECT_PKG, Object)* cthis);
        mbool (*equal)(OOC_PEN(OBJECT_PKG, Object)* cthis, OOC_PEN(OBJECT_PKG, Object)* oPeer);
    };
    
    OOC_CLASS_STA_DEF_(OBJECT_PKG, Object) {
#if (OOC_CFG_SW_DEBUG == OOC_SWITCH_ON)
        struct {
            struct {
                CListDef* pObjList; //系统运行中所有对象的集合
                void* (*malloc)(size_t nSize, muc8* pFileName, mu32 nLine);
                void (*free)(void* cthis, void* pObj);
                void (*report)(MLeakReportLevelDef eLevel);
            } tMLeak;
        } tDbg;
#endif
        void (*release)(void* cthis);
        mbool (*instanceof)(void* cthis, muc8* sTypeName);
    };    
    
    
    extern OOC_CLASS_STA_DEF(OBJECT_PKG, Object);

    //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    //name:     OOC_CTOR_NAME(OOC_PEN(OBJECT_PKG,Object))
    //brief:    构造函数
    //input:    无
    //return:   无
    //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    OOC_PEN(OBJECT_PKG, Object)* OOC_CTOR_NAME_P(OBJECT_PKG, Object)(void);
    
#ifdef __cplusplus
}
#endif

#endif /* OBJECT_H */

